package edu.ustb.aop;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MainApp {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		ApplicationContext context = new ClassPathXmlApplicationContext("/edu/ustb/aop/beans.xml");
		HelloService helloService = (HelloService) context.getBean("proxyFactoryBean");
		helloService.sayHello();
		((ByeService) helloService).sayBye();
	}

}
